package com.ruoyi.common.domin;

import com.ruoyi.common.AsyncTcpServer;

import com.ruoyi.common.DataConversion.UpReadParamAllPackage;
import com.ruoyi.common.DataConversion.UpReadParamNewPackage;
import com.ruoyi.common.DataConversion.UpWriteParametersNewPackage;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @ClassName MainObject
 * @Description 保存系统公用变量
 * @Author 张永永
 * @Date 2020-11-16 16:07
 * @Version 1.0.0.0
 **/
@Component
public class MainObject {

    public static final Lock TEST_INSERT_LOCK = new ReentrantLock();


    public static CopyOnWriteArrayList<ConcurrentHashMap<String, Object>> LIST_REAL_TEST = new CopyOnWriteArrayList<>();


    /****************************************************TCP 操作********************************************/

    /**
     * TCP服务端对象
     */
    public static AsyncTcpServer tcpServer = null;

/************************************************************************************************************************************************/

//    public static ConcurrentHashMap<String, Object> REDERPARAM = new CopyOnWriteArrayList<HashMap>();

    public static HashMap<String, UpReadParamNewPackage> REDERPARAM = new HashMap();

    public static HashMap<String, UpWriteParametersNewPackage> WRITE_PARAM_SEND_RECEIVER_MAP = new HashMap();


    public static HashMap<String, UpReadParamAllPackage> REDERALLPARAM = new HashMap();

}
